import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [{
        path: '/',
        redirect: '/index'

    }, {
        path: '/index',
        name: 'index',
        component: () =>
            import ('@/views/index')
    },
    {
        path: '/add',
        component: () =>
            import ('@/views/add')
    },
    {
        path: '/update',
        component: () =>
            import ('@/views/update')
    }
]

const router = new VueRouter({
    routes
})

export default router